-module(bnode_successer).
-include("btree.hrl").

%% API
-export([forward/2]).
-export([backward/2]).

forward(BTree, BNode) ->
    #bn{children = [Children]} = BNode,
    bnode_api:forward(BTree, Children).

backward(BTree, BNode) ->
    bnode_api:backward(BTree#bt{result = ?SUCCESS}, BNode).